﻿////////////////////////////////////////////////////////////////////////
//Autor: Gabriel Tame Borao  - gabrieltame@yahoo.es 
//Fecha: 2010/09/15 01:26
//Solucion: GTameReport.sln
//Proyecto: GTameReport
//Fichero: MatrixType.cs
//
//	Copyright (C) 2010  Gabriel Tame Borao (GTB)
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
namespace GTameReport
{
    using Rdl;
    using System;
    using System.Collections;

    public class MatrixType
    {
        private GTameReport.ActionType _Action;
        private string _Bookmark;
        private string _CellDataElementName;
        private MatrixTypeCellDataElementOutput _CellDataElementOutput;
        private GTameReport.ColumnGroupingsType _ColumnGroupings;
        private GTameReport.CornerType _Corner;
        private GTameReport.CustomPropertiesType _CustomProperties;
        private string _DataElementName;
        private MatrixTypeDataElementOutput _DataElementOutput;
        private string _DataSetName;
        private GTameReport.FiltersType _Filters;
        private uint? _GroupsBeforeRowHeaders = null;
        private string _Height;
        private bool? _KeepTogether = null;
        private string _Label;
        private MatrixTypeLayoutDirection _LayoutDirection;
        private string _Left;
        private string _LinkToChild;
        private GTameReport.MatrixColumnsType _MatrixColumns;
        private GTameReport.MatrixRowsType _MatrixRows;
        private string _NoRows;
        private bool? _PageBreakAtEnd = null;
        private bool? _PageBreakAtStart = null;
        private string _RepeatWith;
        private GTameReport.RowGroupingsType _RowGroupings;
        private GTameReport.StyleType _Style;
        private string _ToolTip;
        private string _Top;
        private GTameReport.VisibilityType _Visibility;
        private string _Width;
        private uint? _ZIndex = null;
        private string nameField;

        public Rdl.MatrixType Write()
        {
            Rdl.MatrixType type = new Rdl.MatrixType();
            ArrayList list = new ArrayList();
            ArrayList list2 = new ArrayList();
            type.Name = this.nameField;
            if (this._Action != null)
            {
                list.Add(this._Action.Write());
                list2.Add(ItemsChoiceType19.Action);
            }
            if (this._Bookmark != null)
            {
                list.Add(this._Bookmark);
                list2.Add(ItemsChoiceType19.Bookmark);
            }
            if (this._CellDataElementName != null)
            {
                list.Add(this._CellDataElementName);
                list2.Add(ItemsChoiceType19.CellDataElementName);
            }
            list.Add(this._CellDataElementOutput);
            list2.Add(ItemsChoiceType19.CellDataElementOutput);
            if (this._ColumnGroupings != null)
            {
                list.Add(this._ColumnGroupings.Write());
                list2.Add(ItemsChoiceType19.ColumnGroupings);
            }
            if (this._Corner != null)
            {
                list.Add(this._Corner.Write());
                list2.Add(ItemsChoiceType19.Corner);
            }
            if (this._CustomProperties != null)
            {
                list.Add(this._CustomProperties.Write());
                list2.Add(ItemsChoiceType19.CustomProperties);
            }
            if (this._DataElementName != null)
            {
                list.Add(this._DataElementName);
                list2.Add(ItemsChoiceType19.DataElementName);
            }
            list.Add(this._DataElementOutput);
            list2.Add(ItemsChoiceType19.DataElementOutput);
            if (this._DataSetName != null)
            {
                list.Add(this._DataSetName);
                list2.Add(ItemsChoiceType19.DataSetName);
            }
            if (this._Filters != null)
            {
                list.Add(this._Filters.Write());
                list2.Add(ItemsChoiceType19.Filters);
            }
            if (this._GroupsBeforeRowHeaders.HasValue)
            {
                list.Add(this._GroupsBeforeRowHeaders);
                list2.Add(ItemsChoiceType19.GroupsBeforeRowHeaders);
            }
            if (this._Height != null)
            {
                list.Add(this._Height);
                list2.Add(ItemsChoiceType19.Height);
            }
            if (this._KeepTogether.HasValue)
            {
                list.Add(this._KeepTogether);
                list2.Add(ItemsChoiceType19.KeepTogether);
            }
            if (this._Label != null)
            {
                list.Add(this._Label);
                list2.Add(ItemsChoiceType19.Label);
            }
            list.Add(this._LayoutDirection);
            list2.Add(ItemsChoiceType19.LayoutDirection);
            if (this._Left != null)
            {
                list.Add(this._Left);
                list2.Add(ItemsChoiceType19.Left);
            }
            if (this._LinkToChild != null)
            {
                list.Add(this._LinkToChild);
                list2.Add(ItemsChoiceType19.LinkToChild);
            }
            if (this._MatrixColumns != null)
            {
                list.Add(this._MatrixColumns.Write());
                list2.Add(ItemsChoiceType19.MatrixColumns);
            }
            if (this._MatrixRows != null)
            {
                list.Add(this._MatrixRows.Write());
                list2.Add(ItemsChoiceType19.MatrixRows);
            }
            if (this._NoRows != null)
            {
                list.Add(this._NoRows);
                list2.Add(ItemsChoiceType19.NoRows);
            }
            if (this._PageBreakAtEnd.HasValue)
            {
                list.Add(this._PageBreakAtEnd);
                list2.Add(ItemsChoiceType19.PageBreakAtEnd);
            }
            if (this._PageBreakAtStart.HasValue)
            {
                list.Add(this._PageBreakAtStart);
                list2.Add(ItemsChoiceType19.PageBreakAtStart);
            }
            if (this._RepeatWith != null)
            {
                list.Add(this._RepeatWith);
                list2.Add(ItemsChoiceType19.RepeatWith);
            }
            if (this._RowGroupings != null)
            {
                list.Add(this._RowGroupings.Write());
                list2.Add(ItemsChoiceType19.RowGroupings);
            }
            if (this._Style != null)
            {
                list.Add(this._Style.Write());
                list2.Add(ItemsChoiceType19.Style);
            }
            if (this._ToolTip != null)
            {
                list.Add(this._ToolTip);
                list2.Add(ItemsChoiceType19.ToolTip);
            }
            if (this._Top != null)
            {
                list.Add(this._Top);
                list2.Add(ItemsChoiceType19.Top);
            }
            if (this._Visibility != null)
            {
                list.Add(this._Visibility.Write());
                list2.Add(ItemsChoiceType19.Visibility);
            }
            if (this._Width != null)
            {
                list.Add(this._Width);
                list2.Add(ItemsChoiceType19.Width);
            }
            if (this._ZIndex.HasValue)
            {
                list.Add(this._ZIndex);
                list2.Add(ItemsChoiceType19.ZIndex);
            }
            type.Items = list.ToArray();
            type.ItemsElementName = (ItemsChoiceType19[]) list2.ToArray(typeof(ItemsChoiceType19));
            list2 = null;
            list = null;
            return type;
        }

        public GTameReport.ActionType Action
        {
            get
            {
                if (this._Action == null)
                {
                    this._Action = new GTameReport.ActionType();
                }
                return this._Action;
            }
            set
            {
                this._Action = value;
            }
        }

        public string Bookmark
        {
            get
            {
                return this._Bookmark;
            }
            set
            {
                this._Bookmark = value;
            }
        }

        public string CellDataElementName
        {
            get
            {
                return this._CellDataElementName;
            }
            set
            {
                this._CellDataElementName = value;
            }
        }

        public MatrixTypeCellDataElementOutput CellDataElementOutput
        {
            get
            {
                return this._CellDataElementOutput;
            }
            set
            {
                this._CellDataElementOutput = value;
            }
        }

        public GTameReport.ColumnGroupingsType ColumnGroupings
        {
            get
            {
                if (this._ColumnGroupings == null)
                {
                    this._ColumnGroupings = new GTameReport.ColumnGroupingsType();
                }
                return this._ColumnGroupings;
            }
            set
            {
                this._ColumnGroupings = value;
            }
        }

        public GTameReport.CornerType Corner
        {
            get
            {
                if (this._Corner == null)
                {
                    this._Corner = new GTameReport.CornerType();
                }
                return this._Corner;
            }
            set
            {
                this._Corner = value;
            }
        }

        public GTameReport.CustomPropertiesType CustomProperties
        {
            get
            {
                if (this._CustomProperties == null)
                {
                    this._CustomProperties = new GTameReport.CustomPropertiesType();
                }
                return this._CustomProperties;
            }
            set
            {
                this._CustomProperties = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return this._DataElementName;
            }
            set
            {
                this._DataElementName = value;
            }
        }

        public MatrixTypeDataElementOutput DataElementOutput
        {
            get
            {
                return this._DataElementOutput;
            }
            set
            {
                this._DataElementOutput = value;
            }
        }

        public string DataSetName
        {
            get
            {
                return this._DataSetName;
            }
            set
            {
                this._DataSetName = value;
            }
        }

        public GTameReport.FiltersType Filters
        {
            get
            {
                if (this._Filters == null)
                {
                    this._Filters = new GTameReport.FiltersType();
                }
                return this._Filters;
            }
            set
            {
                this._Filters = value;
            }
        }

        public uint? GroupsBeforeRowHeaders
        {
            get
            {
                return this._GroupsBeforeRowHeaders;
            }
            set
            {
                this._GroupsBeforeRowHeaders = value;
            }
        }

        public string Height
        {
            get
            {
                return this._Height;
            }
            set
            {
                this._Height = value;
            }
        }

        public bool? KeepTogether
        {
            get
            {
                return this._KeepTogether;
            }
            set
            {
                this._KeepTogether = value;
            }
        }

        public string Label
        {
            get
            {
                return this._Label;
            }
            set
            {
                this._Label = value;
            }
        }

        public MatrixTypeLayoutDirection LayoutDirection
        {
            get
            {
                return this._LayoutDirection;
            }
            set
            {
                this._LayoutDirection = value;
            }
        }

        public string Left
        {
            get
            {
                return this._Left;
            }
            set
            {
                this._Left = value;
            }
        }

        public string LinkToChild
        {
            get
            {
                return this._LinkToChild;
            }
            set
            {
                this._LinkToChild = value;
            }
        }

        public GTameReport.MatrixColumnsType MatrixColumns
        {
            get
            {
                if (this._MatrixColumns == null)
                {
                    this._MatrixColumns = new GTameReport.MatrixColumnsType();
                }
                return this._MatrixColumns;
            }
            set
            {
                this._MatrixColumns = value;
            }
        }

        public GTameReport.MatrixRowsType MatrixRows
        {
            get
            {
                if (this._MatrixRows == null)
                {
                    this._MatrixRows = new GTameReport.MatrixRowsType();
                }
                return this._MatrixRows;
            }
            set
            {
                this._MatrixRows = value;
            }
        }

        public string Name
        {
            get
            {
                return this.nameField;
            }
            set
            {
                this.nameField = value;
            }
        }

        public string NoRows
        {
            get
            {
                return this._NoRows;
            }
            set
            {
                this._NoRows = value;
            }
        }

        public bool? PageBreakAtEnd
        {
            get
            {
                return this._PageBreakAtEnd;
            }
            set
            {
                this._PageBreakAtEnd = value;
            }
        }

        public bool? PageBreakAtStart
        {
            get
            {
                return this._PageBreakAtStart;
            }
            set
            {
                this._PageBreakAtStart = value;
            }
        }

        public string RepeatWith
        {
            get
            {
                return this._RepeatWith;
            }
            set
            {
                this._RepeatWith = value;
            }
        }

        public GTameReport.RowGroupingsType RowGroupings
        {
            get
            {
                if (this._RowGroupings == null)
                {
                    this._RowGroupings = new GTameReport.RowGroupingsType();
                }
                return this._RowGroupings;
            }
            set
            {
                this._RowGroupings = value;
            }
        }

        public GTameReport.StyleType Style
        {
            get
            {
                if (this._Style == null)
                {
                    this._Style = new GTameReport.StyleType();
                }
                return this._Style;
            }
            set
            {
                this._Style = value;
            }
        }

        public string ToolTip
        {
            get
            {
                return this._ToolTip;
            }
            set
            {
                this._ToolTip = value;
            }
        }

        public string Top
        {
            get
            {
                return this._Top;
            }
            set
            {
                this._Top = value;
            }
        }

        public GTameReport.VisibilityType Visibility
        {
            get
            {
                if (this._Visibility == null)
                {
                    this._Visibility = new GTameReport.VisibilityType();
                }
                return this._Visibility;
            }
            set
            {
                this._Visibility = value;
            }
        }

        public string Width
        {
            get
            {
                return this._Width;
            }
            set
            {
                this._Width = value;
            }
        }

        public uint? ZIndex
        {
            get
            {
                return this._ZIndex;
            }
            set
            {
                this._ZIndex = value;
            }
        }
    }
}

